package com.longe.controller;

import com.longe.service.ProviderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConsumerController {

    @Autowired
    private ProviderService providerService;//有红线,不用管

    @RequestMapping(value = "consumer/{id}")
    public String consumer(@PathVariable Integer id){
        return providerService.requestProviderService(id);
    }

    @RequestMapping("consumer/two")
    public String consumer2(){
        return providerService.requestProviderServiceTwo();
    }
}